import { axiosGetH3WorkFlowList } from "@/api/home";
export default {
  data() {
    return {
      columnData: [
        { prop: "instanceName", label: "审批事项" },
        { prop: "workflowName", label: "流程名称" },
        { prop: "workflowPackage", label: "流程类别" },
        { prop: "activityName", label: "步骤名称" },
        { prop: "originator", label: "发起人" },
        { prop: "startTime", label: "接收时间" }
      ],
      isLoading: true
    };
  },
  created() {
    this.getTaskListData(this.params);
  },
  methods: {
    getTaskListData() {
      axiosGetH3WorkFlowList(this.params)
        .then(res => {
          console.log(res);
          if (res.status === 200) {
            if (res.data.code === 0) {
              this.tableData = res.data.data.records || [];
            }
          }
          this.$emit("tableMount", { data: this.tableData, name: this.name });
          this.isLoading = false;
        })
        ["catch"](err => {
          console.log(err);
          this.isLoading = false;
        });
    }
  }
};
